package com.tamartech.planning.openly;

import org.jboss.resteasy.client.ClientRequest;
import org.jboss.resteasy.client.ClientResponse;


public class ApplicationFactory
{
    private static final String PLANNING_APP = "http://openlylocal.com/planning_applications/{id}.json";

    public static Application get (String id) throws Exception
    {
        ClientRequest req = new ClientRequest(PLANNING_APP);
        req.pathParameter("id", id);
        
        ClientResponse<Application> res = req.get(Application.class);
        return res.getEntity();
    }
}
